// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * CatalogProductEnabledIndex generated by hbm2java
 */
@Entity
@Table(name = "catalog_product_enabled_index", catalog = "magento")
public class CatalogProductEnabledIndex implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private CatalogProductEnabledIndexId id;
	private CoreStore coreStore;
	private CatalogProductEntity catalogProductEntity;
	private short visibility;

	public CatalogProductEnabledIndex() {
	}

	public CatalogProductEnabledIndex(CatalogProductEnabledIndexId id,
			CoreStore coreStore, CatalogProductEntity catalogProductEntity,
			short visibility) {
		this.id = id;
		this.coreStore = coreStore;
		this.catalogProductEntity = catalogProductEntity;
		this.visibility = visibility;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "productId", column = @Column(name = "product_id", nullable = false)),
			@AttributeOverride(name = "storeId", column = @Column(name = "store_id", nullable = false)) })
	public CatalogProductEnabledIndexId getId() {
		return this.id;
	}

	public void setId(CatalogProductEnabledIndexId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id", nullable = false, insertable = false, updatable = false)
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false, insertable = false, updatable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "visibility", nullable = false)
	public short getVisibility() {
		return this.visibility;
	}

	public void setVisibility(short visibility) {
		this.visibility = visibility;
	}

}
